#ifndef _wifimanager_H_
#define _wifimanager_H_

#include <Arduino.h>
#include <DNSServer.h>
#include <ESP8266WiFi.h>
#include <ESP8266WebServer.h>

#include "Skey.h"

#define config_network 0
#define config_location 1


class WiFiManager{

  public:
  WiFiManager();
  void work_mode_set(u8 mode); //0 wifi配置模式  1 经纬度配置模式
  // void autoConnect(char const *apName, char const *apPassword = NULL);
  bool startConfigPortal(char const *apName, char const *apPassword = NULL);
  boolean conect_last();
  bool connectWifi(String ssid, String pass);

  String  ee_ssid = "";
  String  ee_password = "";

  String  longitude  = "";
  String  latitude  = "";
  String  location  = "";
  String  location_up  = "";

  bool work_mode = 0;  //0 wifi配置模式  1 经纬度配置模式
  

  private:
  

};



extern WiFiManager wifima;


#endif